package com.hzit.controller;


import com.hzit.entity.Classes;
import com.hzit.service.ClassesService;
import com.hzit.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@RestController
@RequestMapping("/classes")
public class ClassesController {
	@Autowired
	private ClassesService classesService;

	@GetMapping("/list")
	public R list(){
		List<Classes> classesList = classesService.finAll();
		return R.ok().data("list",classesList);
	}
}
